<template>
  <div>
    <!-- <el-dialog :title="operator" :visible.sync="dialogFormVisible"> -->
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="82px" class="demo-ruleForm">
             <!-- 职能范围 -->
            <el-form-item label="功能范围" prop="name">
              <div class="jobRange">
                <el-tree :data="data" show-checkbox node-key="id" default-expand-all :expand-on-click-node="false">
                </el-tree>
              </div>
            </el-form-item>
        </el-form>
    <!-- </el-dialog> -->
  </div>
</template>

<script>
export default {
   props:{
        operator:{type:String,default:""}
    },
  data() {
    return {
      dialogFormVisible: false,
      ruleForm: {
          name: '',
        },
      rules: {
          name: [
            { required: true, message: '请输入角色', trigger: 'blur' },
            { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
          ],
       },
      data: [
        {
          label: "组织管理",
          children: [
            {
              label: "组织架构",
            },
            {
              label: "法人公司",
            },
          ],
        },
        {
          label: "员工管理",
          children: [
            {
              label: "员工信息",
            },
            {
              label: "入职办理",
            },
            {
              label: "转正办理",
            },
            {
              label: "离职办理",
            },
          ],
        },
        {
          label: "客户管理",
          children: [
            {
              label: "vip客户",
            },
            {
              label: "普通客户",
            },
          ],
        },
      ],
      defaultProps: {
        children: "children",
        label: "label",
      },
    };
  },
  methods: {
    handleNodeClick(data) {
      console.log(data);
    },
  },
};
</script>

<style lang="less" scoped>
/deep/.el-dialog__header{
  text-align: left;
}
/deep/.el-form-item__label{
  padding: 0 ;
} 
/deep/.jobRange{
  border: 1px solid #ddd;

  border-radius: 5px;
  width: 600px;
  margin-left: 15px;
}
/deep/.el-input{
  width: 600px;
}
</style>